#include "headfiles.h"

using namespace std;

int main(int argc, char **argv) {
    if (argc != 3) {
        cout << "Usage: " << argv[0] << " file n" << endl;
        return 0;
    }

    int val = atoi(argv[2]);

    NODE *head = createLinkList(argv[1]);

    printLinkList(head);

    head = removeNthFromEnd(head, val);

    printLinkList(head);

    destroyLinkList(head);

    return 0;
}
